package zero.tech.games.jh.util;

import org.springframework.stereotype.Component;

import zero.tech.games.jh.data.JhConfig;
import zero.tech.games.jh.data.JhGameBase;
import zero.tech.games.jh.data.notify.NotifyGameStart;
import zero.tech.games.logic.common.Room;
@Component
public class PackageUtil {

	public static NotifyGameStart packageNotifyGameStart(Room room) {
		JhGameBase jhGameBase = (JhGameBase) room.getGameBase();
		JhConfig jhConfig = (JhConfig) room.getGameConfig();
		NotifyGameStart notifyGameStart = new NotifyGameStart();
		notifyGameStart.setBanker_uid(jhGameBase.getBanker_uid());
		notifyGameStart.setDispatch_uid(jhGameBase.getDispatch_uid());
		notifyGameStart.setLeft_timer(jhConfig.getSpeed());
		return notifyGameStart;
	}
}
